<?php

namespace IDock\Insurance\MACN\Request;

use Exception;
use IDock\Insurance\MACN\Response\RenewalInquiryResponse;
use IDock\Visitor\RenewalInquiryVisitor;

class RenewalInquiryRequest extends AllMACNRequest
{
    protected $requestType = '0001';

    protected $response = RenewalInquiryResponse::class;

    protected $urlTip = '续保查询';

    /*** @var  RenewalInquiryVisitor $visitor */
    protected $visitor;

    /**
     * @return array
     * @throws Exception
     */
    public function generate(): array
    {
        $param = [
            'baseInfo' => [
                'plateNum' => $this->visitor->licenseNo,
                'operatorCode' => $this->visitor->argc['operatorCode'] ?? '',
                'frameNo' => $this->visitor->vin,
            ],
        ];
        return $param;
    }
}